<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use app\middleware\Check;
use think\facade\Route;

//Route::get('think', function () {
//    return 'hello,ThinkPHP6!';
//});
//
//Route::get('hello/:name', 'index/hello');
//===
Route::get('/', 'home/home') ->middleware(Check::class);
Route::get('/home/:current/:size', 'home/home') ->middleware(Check::class);
Route::post('addGuestBook','home/addGuestBook') ->middleware(Check::class);
Route::get('/delete/:id', 'home/deleteGuestBook') ->middleware(Check::class);

//==
Route::get('/toLogin', 'login/tologin');
Route::post('/login','login/login');
Route::get('/outLogin', 'login/outLogin');

//==
Route::post('/email','Register/email');
Route::get('/toRegister','Register/toRegister');
Route::post('/register','Register/register');